﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BMLib;
namespace BrainMatch
{
    public partial class WaveFileBar : UserControl
    {
        private WaveFileObject m_FileObject = null;
        private WaveManager m_Manager = null;

        public WaveFileObject WaveFile
        {
            get
            {
                return m_FileObject;
            }
        }
        public ControlCollection Balls
        {
            get
            {
                return flowLayoutPanel1.Controls;
            }
        }
        public WaveFileBar(WaveFileObject fileobject,WaveManager manager)
        {
            m_FileObject = fileobject;
            m_Manager = manager;

            InitializeComponent();
            MakeBalls();
        }

        private void MakeBalls()
        {
            foreach (var ball in m_FileObject.Waves)
            {
                WaveBall wb = new WaveBall(ball, m_Manager);
                flowLayoutPanel1.Controls.Add(wb);
            }
            label1.Text = m_FileObject.FilePath;
        }
    }
}
